//
//  WPFindPayPwdViewModel.m
//  ZhongChouPingTai
//
//  Created by WeiPan on 16/4/12.
//  Copyright © 2016年 WPJoe. All rights reserved.
//

#import "WPFindPayPwdViewModel.h"

@implementation WPFindPayPwdViewModel
+ (void)findPwdWithPhone:(NSString *)phone andCode:(NSString *)code andPwd:(NSString *)pwd andSuccessBlock:(void (^)(NSString *))succ andFailureBlock:(void (^)(NSString *))fail {
    NSDictionary * params = @{@"mobile":phone,
                              @"captcha":code,
                              @"newpwd":pwd
                              };
    [NetWorkingManager postWithUrl:@"moveSoftware/findPayPwd.jhtml" requestParams:[NetWorkingManager paramsByAppendingUserInfo:params] SuccessHandler:^(id responseObject) {
        if (responseObject[@"resultType"] && [responseObject[@"resultType"] intValue]) {
            succ(@"重置支付密码成功");
        } else {
            fail(responseObject[@"resultMsg"]);
        }
    } failureHandler:^(NSError *error) {
        fail(error.localizedDescription);
    }];
}
@end
